import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { BlockComponent } from './block.component';

const routes: Routes = [
  {
    path : '' , component: BlockComponent,
    children: [
      {
        path : 'shopping-mall' , loadChildren : () => import('../shopping-mall/shopping-mall.module').then(m => m.ShoppingMallModule)
      },
      {
        path : 'shopping-car' , loadChildren : () => import('../shopping-car/shopping-car.module').then(m => m.ShoppingCarModule)
      },
      {
        path : 'person-center' , loadChildren : () => import('../person-center/person-center.module').then(m => m.PersonCenterModule)
      },
      {
        path : '' , redirectTo : 'shopping-mall', pathMatch : 'full'
      },
    ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class BlockRoutingModule { }
